import Vue from "vue"
/** 
 * 医师预约项目服务管理
 */
export default {
  /**
   * 添加预约项目
   *
   * @param {*} [params={}]
   * @param {*} config
   * @returns
   */
  async addAppointmentItem(params = {}, config = {}) {
    let result = await Vue.http.post('/DoctorAppointmentItem/AddAppointmentItem', params, config);
    return result;
  },
  /**
   * 修改预约项目
   *
   * @param {*} [params={}]
   * @param {*} config
   * @returns
   */
  async updateAppointmentItem(params = {}, config = {}) {
    let result = await Vue.http.put('/DoctorAppointmentItem/UpdateAppointmentItem', params, config);
    return result;
  },
  /**
   * 根据预约编号获取预约项目
   *
   * @param {*} [params={}]
   * @param {*} config
   * @returns
   */
  async getAppointmentItemByID(params = {}, config = {}) {
    config.params = params;
    let result = await Vue.http.get('/DoctorAppointmentItem/GetAppointmentItemByID', config);
    return result;
  },
  /**
   * 根据医师编号获取预约项目
   *
   * @param {*} [params={}]
   * @param {*} config
   * @returns
   */
  async getAppointmentItemByDoctorID(params = {}, config = {}) {
    config.params = params;
    let result = await Vue.http.get('/DoctorAppointmentItem/GetAppointmentItemByDoctorID', config);
    return result;
  },
  /**
   * 删除预约项目
   *
   * @param {*} [params={}]
   * @param {*} config
   * @returns
   */
  async deleteAppointmentItem(params = {}, config = {}) {
    config.params = params;
    let result = await Vue.http.get('/DoctorAppointmentItem/DeleteAppointmentItem', config);
    return result;
  },
  /**
   * 分页获取预约项目
   *
   * @param {*} [params={}]
   * @param {*} config
   * @returns
   */
  async getAppointmentItemList(params = {}, config = {}) {
    config.params = params;
    let result = await Vue.http.get('/DoctorAppointmentItem/GetAppointmentItemList', config);
    return result;
  }
}
